package com.tbit.main.pojo;

import com.tbit.main.util.DateTimeUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.text.ParseException;

/**
 * @author LMY
 * @create 2021-01-08 15:46
 * 巡检车辆
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PatrolLog {
    //id
    private Integer patrolLogId;
    //运营区域id
    private Integer accountId;
    //设备id
    private Integer machineId;
    //车辆编码
    private String userCode;
    //设备编号
    private String machineNO;
    //运维人员id
    private Integer accountUserId;
    //运维人员姓名
    private String userName;
    //开始时间
    private String startTime;
    //开始时间戳
    private Long startTimestamp;
    //结束时间
    private String endTime;
    //结束时间戳
    private Long endTimestamp;
    //图片
    private String imageId;
    //是否有效
    private Integer isValid;
    //备注
    private String remark;
    private Integer regionId;

    public void setStartTimestamp(String startTimestamp) throws ParseException {
        this.startTimestamp = DateTimeUtil.getTimestamp(startTimestamp);
    }

    public void setEndTimestamp(String endTimestamp) throws ParseException {
        this.endTimestamp = DateTimeUtil.getTimestamp(endTimestamp);
    }

}
